﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:local="clr-namespace:OMANE.Modules.PMT" 
    mc:Ignorable="d"
	x:Class="WindowNouveauPMT"
	x:Name="Window"
	Title="Création d'un nouveau PMT" Width="Auto" Height="Auto" SizeToContent="WidthAndHeight" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Topmost="True">

	<Window.DataContext>
		<local:ViewModelNouveauPMT/>
	</Window.DataContext>

	<Grid x:Name="LayoutRoot" Margin="10">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto"/>
		</Grid.RowDefinitions>
		<GroupBox Header="Défintion" VerticalAlignment="Bottom" FontWeight="Bold">
			<Grid Margin="10,5,2,0">
				<Grid.RowDefinitions>
					<RowDefinition Height="25"/>
					<RowDefinition Height="25"/>
					<RowDefinition Height="25"/>
					<RowDefinition Height="25"/>
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto"/>
					<ColumnDefinition Width="10"/>
					<ColumnDefinition Width="Auto"/>
				</Grid.ColumnDefinitions>
				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Année - Mois de réalisation :" VerticalAlignment="Center" FontWeight="Normal" Margin="0"/>
				<StackPanel Grid.Column="2" Orientation="Horizontal" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center">
                    <ComboBox HorizontalAlignment="Left" VerticalAlignment="Center" ItemsSource="{Binding ListeAnneeRealisation}" FontWeight="Normal" SelectedItem="{Binding CurrentAnneeRealisation}"/>
					<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="-" VerticalAlignment="Center" Margin="5,0"/>
					<ComboBox HorizontalAlignment="Left" VerticalAlignment="Center" ItemsSource="{Binding ListeMoisRealisation}" FontWeight="Normal" SelectedItem="{Binding CurrentMoisRealisation}"/>
				</StackPanel>
				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Racine des paramètres :" VerticalAlignment="Center" Grid.Row="1" FontWeight="Normal" Margin="0"/>
				<TextBlock Grid.Row="1" Text="{Binding RacineParametres, Mode=OneWay}" VerticalAlignment="Center" Grid.Column="2" FontWeight="Normal" Margin="0" HorizontalAlignment="Left" MaxWidth="360" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" ToolTip="{Binding RacineParametres, Mode=OneWay}"/>
				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Racine de l'infocentre :" VerticalAlignment="Center" Grid.Row="2" FontWeight="Normal" Margin="0"/>
				<TextBlock Grid.Column="2" Grid.Row="2" TextWrapping="Wrap" Text="{Binding RacineInfocentre, Mode=OneWay}" Grid.ColumnSpan="2" VerticalAlignment="Center" FontWeight="Normal" Margin="0" HorizontalAlignment="Left" MaxWidth="360" ToolTip="{Binding RacineInfocentre, Mode=OneWay}"/>
				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Arborescence détaillée :" VerticalAlignment="Center" Grid.Row="3" FontWeight="Normal" Margin="0" IsEnabled="{Binding IsMoisAnneeValide, Mode=OneWay}"/>
				<Button Content="Configurer" Grid.Column="2" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Left" FontWeight="Normal" IsEnabled="{Binding IsMoisAnneeValide, Mode=OneWay}" Command="{Binding OuvrirConfigArbo, Mode=OneWay}"/>
			</Grid>
		</GroupBox>
		<GroupBox Header="PMT de référence" VerticalAlignment="Bottom" FontWeight="Bold" Grid.Row="1" Margin="0,10,0,0">
			<Grid Margin="10,5,0,0">
				<Grid.RowDefinitions>
					<RowDefinition Height="25"/>
					<RowDefinition Height="25"/>
					<RowDefinition Height="25"/>
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto"/>
					<ColumnDefinition Width="10"/>
					<ColumnDefinition Width="Auto"/>
				</Grid.ColumnDefinitions>
				<CheckBox Content="Utiliser un PMT de référence" VerticalAlignment="Center" Grid.ColumnSpan="3" FontWeight="Normal"/>
				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Nom du PMT de référence :" VerticalAlignment="Center" Grid.Row="1" FontWeight="Normal" Margin="0"/>
				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Arborescence détaillée :" VerticalAlignment="Center" Grid.Row="2" FontWeight="Normal" Margin="0"/>
				<Button Content="Visualiser" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" FontWeight="Normal"/>
				<ComboBox Grid.Column="2" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left" ItemsSource="{Binding ListePMTreference}" SelectedItem="{Binding CurrentPMTreference}"/>
			</Grid>
		</GroupBox>
	</Grid>
</Window>